package com.hlm.demo.mapper;

import org.junit.Test;

import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Date;
import java.util.regex.Pattern;

public class TTTT {


    @Test
    public void ttt(){
        String regex = "^((13[0-9])|(14[5|7])|(15([0-3]|[5-9]))|(18[0,5-9]))\\d{8}$";
        String aa = "15842083989";
        boolean b = aa.matches(regex);
        System.out.println(b);
    }


    @Test
    public void t(){
      String regex = "^[1-9]\\d{5}(18|19|([23]\\d))\\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\\d{3}[0-9Xx]$";
      String idCard = "210319201602281929";
        boolean a = idCard.matches(regex);
        System.out.println(a);
    }

    @Test
    public void aaaa(){
        String regex = "(?=(\\b|\\D))(((\\d{1,2})|(1\\d{1,2})|(2[0-4]\\d)|(25[0-5]))\\.){3}((\\d{1,2})|(1\\d{1,2})|(2[0-4]\\d)|(25[0-5]))(?=(\\b|\\D))";
        String ee = "172.09.06.8";
        boolean c = ee.matches(regex);
        System.out.println(c);
    }
}
